<?php 
session_start();
$_SESSION['house'];
$array = unserialize($_SESSION['house']);
include_once('function.php');
$db=new db(); 
$sql = $array;
$file ="house";
$map=array("房屋編號",'區域','房東帳號','來源','類型','坪數','大樓案名',
"聯絡人",'地址','租金','優惠價','最惠價','押金','格局',"出租樓層",'家電',
'家俱','公設','電梯','車位','方位','屋齡','標題','租金包含','保全','特色','店長推薦','發佈時間');//表头 
$db->toExcel($sql,$map,$file); 
?>